package com.example.execption;
/**
 * 对应各种异常的枚举类
 */
public enum TijianExceptionEnum {
    // 文件处理
    FILE_UPLOAD_FAIL(5000,"文件上传失败"),
    FILE_GET_FAIL(5001,"文件获取失败"),
    // 订单
    ORDER_NULL(6000,"订单不存在"),
    CANCEL_ORDER_FAIL(6001,"取消订单失败，至少需要提前一天取消！"),
    ORDER_EXISTS(6002,"不能重复预约同一天同一个项目的体检"),
    ORDERS_DATE_ERROR(6003,"预约日期有误，不能早于今天"),
    ORDERS_FULL(6004,"预约人数已满"),

    // 检查项
    CHECKITEM_NULL(7000,"检查项目列表为空"),
    // 套餐
    SETMEAL_NULL(8000,"套餐信息为空"),
    // 体检机构
    HP_NULL(9000,"体检机构信息为空"),
    // 用户模块
    NEED_USERNAME(10000,"用户名不能为空"),
    NEED_PASSWORD(10001,"密码不能为空"),
    USER_NOT_EXISTS(10002,"用户不存在,请先注册！"),
    PHONE_EXISTS(10003,"手机号已存在"),
    REGISTER_FAIL(10004,"注册失败"),
    USERNAME_PASSWORD_WRONG(10005,"用户名密码错误"),
    NEED_LOGIN(10006,"请先登录"),
    DATA_NO_COMPLETE(10007,"请确保信息填写完整"),
    // 用户模块
    GET_VL_CODE_FAIL(10008,"验证码获取失败，请检查手机号是否填写错误！"),
    VL_CODE_ERROR(10009,"验证码错误"),
    VL_CODE_EXPIRED(10010,"验证码已过期"),
    BIRTHDAY_ERROR(10011,"生日信息填写错误，生日不能晚于今天！"),
    SYSTEM_ERROR(11000,"系统异常"),
    REQUEST_PARAM_ERROR(10102,"请求参数错误")
    ;
    //先提供枚举类的构造方法,权限修饰符注意是私有的
    private TijianExceptionEnum(Integer code,String message)
    {
        this.code=code;
        this.message=message;
    }

    private Integer code;
    private String message;
    public Integer getCode() {
        return code;
    }
    public void setCode(Integer code) {
        this.code = code;
    }
    public String getMessage() {
        return message;
    }
    public void setMessage(String message) {
        this.message = message;
    }
}